extends Control

@onready var new_gmae: Button = $VBoxContainer/NewGmae
@onready var v_box_container: VBoxContainer = $VBoxContainer
@onready var load_gmae: Button = $VBoxContainer/LoadGmae

func _ready() -> void:
	load_gmae.disabled = not Game.has_save()
	new_gmae.grab_focus()
	
	for button: Button in v_box_container.get_children():
		button.mouse_entered.connect(button.grab_focus)
	
	SoundManager.setup_ui_sounds(self)

func _on_new_gmae_pressed() -> void:
	Game.new_game()

func _on_load_gmae_pressed() -> void:
	Game.load_game()

func _on_exit_gmae_pressed() -> void:
	get_tree().quit()
